#include <iostream>
using namespace std;

class Person
{
    public:
        Person(int age, bool isMale);
        Person(int age);
        void output() const;
        void set();
        int getAge() const { return age; };
    private:
        int age;
        bool isMale;
};

void IsAdult(const Person& people)
{
    int age = people.getAge();
    if (age < 18)
        cout << "Not Adult !" << endl;
    else
        cout << "Adult !" << endl;
}

int main()
{
    Person xiaoming(18, true);
    xiaoming.output();
    IsAdult(xiaoming);
    
    xiaoming.set();
    xiaoming.output();
    IsAdult(xiaoming);

    return 0;
}

Person::Person(int age, bool isMale) : age(age), isMale(isMale)
{}

Person::Person(int age) : age(age)
{}

void Person::output() const
{
    if (isMale)
        cout << "This man is ";
    else
        cout << "This women is ";
    cout << age << " years old" << endl;
}

void Person::set()
{
    cout << "Enter the correct age for this person: ";
    cin >> age;
}